package com.action;

import java.util.List;

import com.entity.Category;
import com.service.CategoryService;
import com.service.Impl.CategoryServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

@Controller
@Scope("prototype")
public class CategoryAction {
	@Autowired
	private CategoryService service;
	private List<Category> category;
	private Integer parentId;
	private Category c;
	public Integer getParentId() {
		return parentId;
	}
	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}
	public Category getC() {
		return c;
	}
	public void setC(Category c) {
		this.c = c;
	}
	public List<Category> getCategory() {
		return category;
	}
	public void setCategory(List<Category> category) {
		this.category = category;
	}
	public String selectAll(){

		category=service.selectAll();
		return "toMain";
	}
}
